﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "产品图片_i管理";
    var promodel =  ViewData["promodel"] as ProductsInfo;
}
@using MiniWeb.Core.Entities
@using MiniWeb.Core.Enums
@using WFramework.Extensions
@using WFramework.MvcPager
@model PagedList<MiniWeb.Core.Entities.ProductsImgInfo>
<link href="../../Scripts/colorbox/colorbox.css" rel="stylesheet" type="text/css" />
<link href="../../Scripts/colorbox/colorbox.css" rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/colorbox/jquery.colorbox-min.js" type="text/javascript"></script>
<script src="../../Scripts/AdminCommon.js" type="text/javascript"></script>
<script src="../../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $(".box").colorbox({
            iframe: true,
            width: 550,
            height: 550,
            onClosed: function () {
                window.location.reload();
            }
        });
    });
</script>
<div class="right_box_card">
    <ul>
        <li class="right_box_card1"><a href="@Url.Action("List", "ProductsImgInfoManager")">产品图片_i管理</a></li>
    </ul>
</div>
<div style="line-height: 40px;">
    <p class="avatar_btn">
        <a href="@Url.Action("Save", "ProductsImgInfoManager",new {pid=promodel.ID})" class="box" id="lnkAdd">新增</a>
    </p>
</div>
<div>
    @using (Html.BeginForm("List", "ProductsImgInfoManager", FormMethod.Get))
    {
        <table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
            cellpadding="0">
            <tr height="40px">
                <td>
                    当前产品ID:<font color="red">@promodel.ID</font>，产品名称：<font color="red">@promodel.ProductsName</font>
                </td>
                <td>
                    <input type="submit" value="查找" class="submit" style="float: left; width: 80px;" />
                </td>
            </tr>
        </table>
    }
</div>
<table class="right_box_tab" style="margin-top: 10px;" width="100%" border="0" cellspacing="0"
    cellpadding="0">
    <tr height="30" class="tab_title">
        <td>
            ID
        </td>
        <td>
            产品ID
        </td>
        <td>
            产品名称
        </td>
        <td>
            产品图片
        </td>
        <td>
            添加时间
        </td>
        <td>
            操作
        </td>
    </tr>
    @foreach (var item in Model)
    {
        <tr height="35" class="tab_td1">
            <td>
                @item.ID
            </td>
            <td>
                @item.ProductsID
            </td>
            <td>
                @item.ProductsName
            </td>
            <td>
                <img src="@item.ProductsImg" width="50" height="50"/>
            </td>
            <td>
                @item.CreateDate
            </td>
            <td>
                @Html.ActionLink("修改", "Save", "ProductsImgInfoManager", new { id = item.ID }, new { @class = "box" })
                <a href="#" onclick="DeletePost('/ProductsImgInfoManager/Delete', { id: @item.ID})">
                    删除</a>
            </td>
        </tr>
    }
</table>
<div style="padding: 10px;">
    @Html.Pager(Model)
</div>
